/**
 *====================================================
 * 文件名称: ContainerBulkstockHistoryEntity.java
 * 修订记录：
 * No    日期				作者(操作:具体内容)
 * 1.    2016年5月24日			chenxy(创建:创建文件)
 *====================================================
 * 类描述：(说明未实现或其它不应生成javadoc的内容)
 */
package com.yuexunit.finance.project.entity;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.yuexunit.finance.bulkstock.entity.lexicon.MeasurementEnum;

/**
 * @ClassName: ContainerBulkstockHistoryEntity
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author chenxy
 * @date 2016年5月24日 下午2:58:42
 */
@Entity
@Table(name = "FIN_CONTAINER_BULKSTOCK_HISTORY")
public class ContainerBulkstockHistoryEntity implements Cloneable {

	/** 理货货物记录ID */
	@Id
	@GeneratedValue
	@Column(name = "BULKSTOCK_HISTORY_ID")
	private Long bulkstockHistoryId;

	/** 箱理货历史记录ID */
	@Column(name = "INVENTORY_HISTORY_ID")
	private Long inventoryHistoryId;

	/** 箱货明细ID */
	@Column(name = "CONTAINER_BULKSTOCK_ID")
	private Long containerBulkstockId;

	/** 融资信息ID */
	@Column(name = "FINANCE_ID")
	private Long financeId;

	/** 理货单ID */
	@Column(name = "TALLYING_ID")
	private Long tallyingId;

	/** 收货明细ID */
	@Column(name = "NOTICE_INVENTORY_ID")
	private Long noticeInventoryId;

	/** 融资货物ID */
	@Column(name = "BULKSTOCK_ID")
	private Long bulkstockId;

	/** 大宗商品类别ID */
	@Column(name = "BULKSTOCK_CATEGORY_ID")
	private Long bulkstockCategoryId;

	/** 大宗商品ID */
	@Column(name = "BULKSTOCK_INFO_ID")
	private Long bulkstockInfoId;

	/** 托盘号 */
	@Column(name = "TRAY_NUMBER")
	private String trayNumber;

	/** 货物名称 */
	@Column(name = "BULKSTOCK_NAME")
	private String bulkstockName;

	/** 规格型号 */
	@Column(name = "SPECIFICATION")
	private String specification;

	/** 单位 */
	@Column(name = "UNIT")
	private String unit;

	/** 计划理货数量 */
	@Column(name = "PLANNED_QUANTITY")
	private BigDecimal plannedQuantity;

	/** 计划体积 */
	@Column(name = "PLANNED_VOLUME")
	private BigDecimal plannedVolume;

	/** 计划重量 */
	@Column(name = "PLANNED_WEIGHT")
	private BigDecimal plannedWeight;

	/** 理货数量 */
	@Column(name = "QUANTITY")
	private BigDecimal quantity;

	/** 理货体积 */
	@Column(name = "VOLUME")
	private BigDecimal volume;

	/** 理货重量 */
	@Column(name = "WEIGHT")
	private BigDecimal weight;

	/** 计量类型 0:未知/1:体积/2:重量 */
	@Column(name = "MEASUREMENT")
	private MeasurementEnum measurement;

	/** 计量数量 */
	@Column(name = "VALUATION_QUANTITY")
	private BigDecimal valuationQuantity;

	/** 申请单价 */
	@Column(name = "BULKSTOCK_PRICE")
	private BigDecimal bulkstockPrice;

	/** 评审单价 */
	@Column(name = "EVALUATE_PRICE")
	private BigDecimal evaluatePrice;

	/** 融资单价 */
	@Column(name = "FINANCE_PRICE")
	private BigDecimal financePrice;

	/** 异常标注 */
	@Column(name = "ABNORMAL")
	private Boolean abnormal;

	/** 理货异常说明 */
	@Column(name = "ABNORMAL_COMMENT")
	private String abnormalComment;

	/** 理货图片 */
	@Column(name = "FILES_UUID")
	private String filesUuid;

	public Long getBulkstockHistoryId() {
		return bulkstockHistoryId;
	}

	public void setBulkstockHistoryId(Long bulkstockHistoryId) {
		this.bulkstockHistoryId = bulkstockHistoryId;
	}

	public Long getInventoryHistoryId() {
		return inventoryHistoryId;
	}

	public void setInventoryHistoryId(Long inventoryHistoryId) {
		this.inventoryHistoryId = inventoryHistoryId;
	}

	public Long getContainerBulkstockId() {
		return containerBulkstockId;
	}

	public void setContainerBulkstockId(Long containerBulkstockId) {
		this.containerBulkstockId = containerBulkstockId;
	}

	public Long getBulkstockId() {
		return bulkstockId;
	}

	public void setBulkstockId(Long bulkstockId) {
		this.bulkstockId = bulkstockId;
	}

	public Long getBulkstockCategoryId() {
		return bulkstockCategoryId;
	}

	public void setBulkstockCategoryId(Long bulkstockCategoryId) {
		this.bulkstockCategoryId = bulkstockCategoryId;
	}

	public Long getBulkstockInfoId() {
		return bulkstockInfoId;
	}

	public void setBulkstockInfoId(Long bulkstockInfoId) {
		this.bulkstockInfoId = bulkstockInfoId;
	}

	public String getTrayNumber() {
		return trayNumber;
	}

	public void setTrayNumber(String trayNumber) {
		this.trayNumber = trayNumber;
	}

	public String getBulkstockName() {
		return bulkstockName;
	}

	public void setBulkstockName(String bulkstockName) {
		this.bulkstockName = bulkstockName;
	}

	public String getSpecification() {
		return specification;
	}

	public void setSpecification(String specification) {
		this.specification = specification;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public BigDecimal getPlannedQuantity() {
		return plannedQuantity;
	}

	public void setPlannedQuantity(BigDecimal plannedQuantity) {
		this.plannedQuantity = plannedQuantity;
	}

	public BigDecimal getPlannedVolume() {
		return plannedVolume;
	}

	public void setPlannedVolume(BigDecimal plannedVolume) {
		this.plannedVolume = plannedVolume;
	}

	public BigDecimal getPlannedWeight() {
		return plannedWeight;
	}

	public void setPlannedWeight(BigDecimal plannedWeight) {
		this.plannedWeight = plannedWeight;
	}

	public BigDecimal getQuantity() {
		return quantity;
	}

	public void setQuantity(BigDecimal quantity) {
		this.quantity = quantity;
	}

	public BigDecimal getVolume() {
		return volume;
	}

	public void setVolume(BigDecimal volume) {
		this.volume = volume;
	}

	public BigDecimal getWeight() {
		return weight;
	}

	public void setWeight(BigDecimal weight) {
		this.weight = weight;
	}

	public BigDecimal getValuationQuantity() {
		return valuationQuantity;
	}

	public void setValuationQuantity(BigDecimal valuationQuantity) {
		this.valuationQuantity = valuationQuantity;
	}

	public Boolean getAbnormal() {
		return abnormal;
	}

	public void setAbnormal(Boolean abnormal) {
		this.abnormal = abnormal;
	}

	public String getAbnormalComment() {
		return abnormalComment;
	}

	public void setAbnormalComment(String abnormalComment) {
		this.abnormalComment = abnormalComment;
	}

	public String getFilesUuid() {
		return filesUuid;
	}

	public void setFilesUuid(String filesUuid) {
		this.filesUuid = filesUuid;
	}

	public Long getTallyingId() {
		return tallyingId;
	}

	public void setTallyingId(Long tallyingId) {
		this.tallyingId = tallyingId;
	}

	public Long getNoticeInventoryId() {
		return noticeInventoryId;
	}

	public void setNoticeInventoryId(Long noticeInventoryId) {
		this.noticeInventoryId = noticeInventoryId;
	}

	public MeasurementEnum getMeasurement() {
		return measurement;
	}

	public void setMeasurement(MeasurementEnum measurement) {
		this.measurement = measurement;
	}

	public BigDecimal getBulkstockPrice() {
		return bulkstockPrice;
	}

	public void setBulkstockPrice(BigDecimal bulkstockPrice) {
		this.bulkstockPrice = bulkstockPrice;
	}

	public BigDecimal getEvaluatePrice() {
		return evaluatePrice;
	}

	public void setEvaluatePrice(BigDecimal evaluatePrice) {
		this.evaluatePrice = evaluatePrice;
	}

	public BigDecimal getFinancePrice() {
		return financePrice;
	}

	public void setFinancePrice(BigDecimal financePrice) {
		this.financePrice = financePrice;
	}

	public Long getFinanceId() {
		return financeId;
	}

	public void setFinanceId(Long financeId) {
		this.financeId = financeId;
	}

	@Override
	public ContainerBulkstockHistoryEntity clone() {
		ContainerBulkstockHistoryEntity o = null;
		try {
			o = (ContainerBulkstockHistoryEntity) super.clone();
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
		return o;
	}

	public boolean existsPlannedQuantity() {
		return plannedQuantity != null && plannedQuantity.intValue() > 0;
	}

	public boolean existsPlannedVolume() {
		return plannedVolume != null && plannedVolume.compareTo(BigDecimal.ZERO) > 0;
	}

	public boolean existsPlannedWeight() {
		return plannedWeight != null && plannedWeight.compareTo(BigDecimal.ZERO) > 0;
	}

}
